//package cn.ycl.system.other.study.netty.nettyClient;
//
//import io.netty.bootstrap.Bootstrap;
//import io.netty.channel.ChannelFuture;
//import io.netty.channel.EventLoopGroup;
//import io.netty.channel.nio.NioEventLoopGroup;
//import io.netty.channel.socket.nio.NioSocketChannel;
//
///**
// * @Author YuanChangLiang
// * @Date 2021/1/19 14:48
// */
//public class NettyClient {
//    public static void main(String[] args) throws Exception{
//        EventLoopGroup group = new NioEventLoopGroup();
//        try {
//            Bootstrap bootstrap = new Bootstrap();
//            //handler中是需要自定义一个初始化类
//            bootstrap.group(group).channel(NioSocketChannel.class).handler(new NettyClientInitializer());
//
//            ChannelFuture channelFuture = bootstrap.connect("39.101.204.247", 7000).sync();
//            channelFuture.channel().closeFuture().sync();
//            }finally {
//            group.shutdownGracefully();
//        }
//    }
//}
